package com.ruoyi.datastatistics.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.*;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 电冻结数据（设备维度）对象 electricity_terminals_freeze_xb
 *
 * @author gdqt
 * @date 2025-03-10
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("electricity_terminals_freeze_xb")
public class ElectricityTerminalsFreezeXb_old extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 平台表单自增主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    /** 设备归属租户 */
    @Excel(name = "设备归属租户")
    @TableField("tenant_id")
    private String tenantId;

    /** 厂家编号 */
    @Excel(name = "厂家编号")
    @TableField("supplier_id")
    private String supplierId;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @TableField("location_nb")
    private String locationNb;

    /** 设备编号 */
    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;

    /** 功能ID号 */
    @Excel(name = "功能ID号")
    @TableField("fun_id")
    private Long funId;

    /** 反转ID号 */
    @Excel(name = "反转ID号")
    @TableField("yt_id")
    private Long ytId;

    /** 初始用电量 */
    @Excel(name = "初始用电量")
    @TableField("first_val")
    private BigDecimal firstVal;

    /** 最后用电量 */
    @Excel(name = "最后用电量")
    @TableField("last_val")
    private BigDecimal lastVal;

    /** 最小值 */
    @Excel(name = "最小值")
    @TableField("min_val")
    private BigDecimal minVal;

    /** 最大值 */
    @Excel(name = "最大值")
    @TableField("max_val")
    private BigDecimal maxVal;

    /** 初始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "初始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("first_time")
    private Date firstTime;

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("last_time")
    private Date lastTime;

    /** 最小值发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最小值发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("min_time")
    private Date minTime;

    /** 最大值发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最大值发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("max_time")
    private Date maxTime;

    /** 当前采集值 */
    @Excel(name = "当前采集值")
    @TableField("data_value")
    private String dataValue;

    /** 倍率 */
    @Excel(name = "倍率")
    @TableField("multiply")
    private BigDecimal multiply;

    /** 手动输入值 */
    @Excel(name = "手动输入值")
    @TableField("in_val")
    private BigDecimal inVal;

    /** 开始尖 */
    @Excel(name = "开始尖")
    @TableField("first_val_1st")
    private BigDecimal firstVal1st;

    /** 开始峰 */
    @Excel(name = "开始峰")
    @TableField("first_val_2nd")
    private BigDecimal firstVal2nd;

    /** 开始平 */
    @Excel(name = "开始平")
    @TableField("first_val_3rd")
    private BigDecimal firstVal3rd;

    /** 开始谷 */
    @Excel(name = "开始谷")
    @TableField("first_val_4th")
    private BigDecimal firstVal4th;

    /** 最后尖 */
    @Excel(name = "最后尖")
    @TableField("last_val_1st")
    private BigDecimal lastVal1st;

    /** 最后峰 */
    @Excel(name = "最后峰")
    @TableField("last_val_2nd")
    private BigDecimal lastVal2nd;

    /** 最后平 */
    @Excel(name = "最后平")
    @TableField("last_val_3rd")
    private BigDecimal lastVal3rd;

    /** 最后谷 */
    @Excel(name = "最后谷")
    @TableField("last_val_4th")
    private BigDecimal lastVal4th;

    /** 净累积量 */
    @Excel(name = "净累积量")
    @TableField("cumulative_flow")
    private BigDecimal cumulativeFlow;

    /** 平均电池电压 */
    @Excel(name = "平均电池电压")
    @TableField("terminal_vol_avg")
    private BigDecimal terminalVolAvg;

    /** 起始抄表读数 */
    @Excel(name = "起始抄表读数")
    @TableField("start_reading")
    private BigDecimal startReading;

    /** 起始抄表时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "起始抄表时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("start_reading_time")
    private Date startReadingTime;

    /** 终止抄表读数 */
    @Excel(name = "终止抄表读数")
    @TableField("end_reading")
    private BigDecimal endReading;

    /** 终止抄表时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "终止抄表时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("end_reading_time")
    private Date endReadingTime;

    /** 用户平均用水量 */
    @Excel(name = "用户平均用水量")
    @TableField("user_avg")
    private String userAvg;

    /** 环比上一周期 */
    @Excel(name = "环比上一周期")
    @TableField("hb")
    private String hb;

    /** 用水状态，报警策略设置的参数计算 */
    @Excel(name = "用水状态，报警策略设置的参数计算")
    @TableField("param_type")
    private Long paramType;

    /** 冻结类型，时：hour 日：day，月：month */
    @Excel(name = "冻结类型，时：hour 日：day，月：month")
    @TableField("frozen_type")
    private String frozenType;

    /** 冻结时间（日/月） */
    @Excel(name = "冻结时间", readConverterExp = "日=/月")
    @TableField("freeze_time")
    private String freezeTime;

    /** 抄回状态(1：当天和前天都抄回数据,2：当天有数据抄回，前一天未抄回数据,3：当天未抄回数据。当天表示需要生成日用量的那天。) */
    @Excel(name = "抄回状态(1：当天和前天都抄回数据,2：当天有数据抄回，前一天未抄回数据,3：当天未抄回数据。当天表示需要生成日用量的那天。)")
    @TableField("copy_rate")
    private Integer copyRate;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;


    @TableField(exist = false)
    @Excel(name = "楼栋名称")
    private String ldName;

    @TableField(exist = false)
    @Excel(name = "用户名称")
    private String userName;

    @TableField(exist = false)
    @Excel(name = "用户编号")
    private String userId;

    @TableField(exist = false)
    @Excel(name = "门牌号")
    private String roomName;

    @Excel(name = "通讯地址")
    @TableField(exist = false)
    private String communicateAddress;

    @TableField(exist = false)
    private String treeRoomId;

    @TableField(exist = false)
    private String belongDepartment;

    @TableField(exist = false)
    private String treeAreaCode;

    @TableField(exist = false)
    private String treeLdId;

    @TableField(exist = false)
    private String installAddress;

    @TableField(exist = false)
    private String startTime;

    @TableField(exist = false)
    private String endTime;

    @JsonIgnore
    @TableField(exist = false)
    private String lastFreezeTime;

}
